package bean;

import java.util.Calendar;

/**
 * Customer bean
 * @author Martin Schophaus
 */
public class Customer extends Person{
	private int customer_nr;
	private Adress invoice_adress = null;
	private Adress delivery_adress = null;
	private double bonus = 0;
	
	/**
	 * 
	 */
	public Customer() {
		
	}
	
	public Customer(String name, String fname, Adress adress, int customer_nr, Adress invoice_adress){
		super(name, fname, adress);
		this.setCustomer_nr(customer_nr);
		this.setInvoice_adress(invoice_adress);
	}
	
	public Customer(
			String name,
			String fname,
			Adress adress,
			Calendar calendar,
			int customer_nr,
			Adress invoice_adress,
			Adress delivery_adress,
			double bonus
			){
		super(name, fname, adress, calendar);
		this.setCustomer_nr(customer_nr);
		this.setInvoice_adress(invoice_adress);
		this.setDeliver_adress(delivery_adress);
		this.setBonus(bonus);
	}
	
	public int getCustomer_nr() {
		return customer_nr;
	}
	public void setCustomer_nr(int customer_nr) {
		this.customer_nr = customer_nr;
	}
	public Adress getInvoice_adress() {
		return invoice_adress;
	}
	public void setInvoice_adress(Adress invoice_adress) {
		this.invoice_adress = invoice_adress;
	}
	public Adress getDeliver_adress() {
		return delivery_adress;
	}
	public void setDeliver_adress(Adress deliver_adress) {
		this.delivery_adress = deliver_adress;
	}
	public double getBonus() {
		return bonus;
	}
	public void setBonus(double bonus) {
		this.bonus = bonus;
	}
	
	@Override
	public String toString() {
		return this.getCustomer_nr() + " " + this.getFname() + " " + this.getName(); 
	}
}
